package com.cwj.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import common.entity.middle.course_teacher;
import common.entity.teacher;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface course_teacherMapper extends BaseMapper<course_teacher> {
    @Select("select * from teacher\n" +
            "where id in (select t.id\n" +
            "    from course join course_teacher ct on course.id = ct.course_id\n" +
            "   join teacher t on t.id = ct.teacher_id\n" +
            "where course.id=#{id})\n" +
            ";")
    List<teacher> getCourseTeacherList(Integer id);
}
